Module modColors

    Public flcolor(6) As Integer
    Public colorname(18), colorabbr(18) As String
    Public mycolors(18, 3, 10) As String

    Public Sub initialize_colors()
        colorname(0) = "Gray" : colorabbr(0) = "Gr"
        mycolors(0, 1, 10) = "000000000 050050050 070070070 096096096 123123123 149149149 175175175 202202202 227227227 248248248"
        mycolors(0, 2, 10) = "000000000 050050050 070070070 096096096 123123123 149149149 175175175 202202202 227227227 248248248"
        mycolors(0, 3, 10) = "000000000 050050050 070070070 096096096 123123123 149149149 175175175 202202202 227227227 248248248"
        colorname(1) = "Yellow" : colorabbr(1) = "Y" '               #60      Saturations (Luminations) at 100,60 and 50"
        '                           0       1           2       3           4       5           6       7       8           9
        mycolors(1, 1, 10) = "250255000 049049000 073073000 097097000 122122000 150150000 176176000 205205000 223223000 239239000"
        mycolors(1, 2, 10) = "029029010 049049016 073073023 098098031 122122038 148148047 175175055 202202064 225225071 238238075"
        mycolors(1, 3, 10) = "028208013 050050025 072072035 096096048 122122060 148148074 175175087 203203102 224224111 237237118"
        colorname(2) = "Orange-Yellow" : colorabbr(2) = "OY" '       #55
        mycolors(2, 1, 10) = "255230000 054049000 078072000 104095000 133119000 162147000 191172000 222200000 242218000 255233027"
        mycolors(2, 2, 10) = "030028009 052048016 077072024 102095032 129120041 156145049 185173058 215201068 236220075 248235114"
        mycolors(2, 3, 10) = "020027014 051049025 075072037 101096050 126121062 153145076 180173089 210202105 232221115 247235121"
        colorname(3) = "Yellow-Orange" : colorabbr(3) = "YO" '       #47
        mycolors(3, 1, 10) = "255200000 059046000 086068000 114090000 145114000 176139000 209165000 242190000 255215068 255231144"
        mycolors(3, 2, 10) = "032027010 057048018 082070026 110094035 138118044 167143053 197168063 229196073 245217114 247230168"
        mycolors(3, 3, 10) = "031027015 055049027 079070039 104093052 131117065 160143079 190170094 219195109 244217116 247230168"
        colorname(4) = "Orange" : colorabbr(4) = "O" '               #39
        '                       0           1           2       3           4       5           6       7       8           9
        mycolors(4, 1, 10) = "255166000 068044000 098064000 130085000 163106000 198129000 233152000 255184050 255212130 255230182"
        mycolors(4, 2, 10) = "035026011 061046019 088067028 119090037 148113047 178136056 211161068 240188089 244215159 248229192"
        mycolors(4, 3, 10) = "033026016 058048029 084069042 109090054 139115070 168139083 200165099 231191116 245215160 246228193"
        colorname(5) = "Red-Orange" : colorabbr(5) = "RO" '          #33
        mycolors(5, 1, 10) = "255140000 073040000 106058000 139077000 178098000 213118000 253140000 255184085 255208149 254227192"
        mycolors(5, 2, 10) = "037025011 063043020 094065029 125087040 157109050 191132060 225156071 240189126 244213174 248229205"
        mycolors(5, 3, 10) = "034026017 060048030 086067043 113088056 144112072 175136088 207161104 239189127 244214176 248229206"
        colorname(6) = "Orange-Red" : colorabbr(6) = "OR" '          #20
        mycolors(6, 1, 10) = "254085001 086029000 125043000 164057000 206070000 250085000 255138077 255179140 255209185 255228213"
        mycolors(6, 2, 10) = "041022013 073040023 106058033 141077044 178097056 215118069 230152113 239188162 245209191 248227216"
        mycolors(6, 3, 10) = "038025019 065043032 094063046 124083062 157106079 190128095 227152113 239185157 240211195 243230222"
        colorname(7) = "Red" : colorabbr(7) = "R" '                  #0
        mycolors(7, 1, 10) = "054000000 102000000 144000000 188000000 235000000 255081081 255135135 255176176 255206206 255224224"
        mycolors(7, 2, 10) = "052016016 086027027 125039039 165052052 209067067 222110110 229148148 240183183 244211211 248227227"
        mycolors(7, 3, 10) = "255000000 074036036 108054054 143072072 180090090 213117117 224152152 234187187 241213213 247227227"
        colorname(8) = "Purple-Red" : colorabbr(8) = "PR" '          #340
        mycolors(8, 1, 10) = "255000086 103000035 142000048 184000062 231000078 255066130 255131173 255174202 255205222 255225236"
        mycolors(8, 2, 10) = "049015026 085027046 124040068 162052089 206065112 221104143 230146174 240184213 246210222 248226233"
        mycolors(8, 3, 10) = "076037086 076037050 107053071 141071094 179089119 204117146 218151173 229187201 238212221 246226233"
        colorname(9) = "Red-Purple" : colorabbr(9) = "RP" '           #320           
        mycolors(9, 1, 10) = "060000040 097000065 136000091 178000120 223000150 255057190 255124212 254173228 255202238 255222245"
        mycolors(9, 2, 10) = "049015038 082026063 119037092 157050122 199063155 222102183 230144202 239180220 244210233 247226240"
        mycolors(9, 3, 10) = "041020034 074036062 105052088 139069116 176087147 204114175 217152196 229185215 236209227 244227239"
        colorname(10) = "Purple" : colorabbr(10) = "P" '              #301
        mycolors(10, 1, 10) = "056000055 093000091 131000129 170000168 211000208 255000252 255118253 255168254 255201255 255222255"
        mycolors(10, 2, 10) = "048015047 081026080 117037116 154049152 193062191 234074232 230137229 239181239 246207246 248224248"
        mycolors(10, 3, 10) = "041020040 072036071 106053105 137069136 173087172 210104209 218148217 229186229 237209237 244227244"
        colorname(11) = "Blue-Purple" : colorabbr(11) = "BP" '        #290
        mycolors(11, 1, 10) = "053000065 087000105 122000147 160000192 202000243 225076255 234131255 242176255 247203255 250225255"
        mycolors(11, 2, 10) = "044160050 074027084 110040124 145052164 183066206 202109221 216148230 230181239 238207244 244226247"
        mycolors(11, 3, 10) = "039021043 069037076 099054108 132072144 165090180 189120203 206152217 223186230 234210238 244225247"
        colorname(12) = "Purple-Blue" : colorabbr(12) = "PB" '        #280
        mycolors(12, 1, 10) = "050000076 080000121 114000171 148000222 184041255 204100255 217141255 231181255 240208255 246226255"
        mycolors(12, 2, 10) = "042017055 073030095 103042133 137057177 169080213 188118222 204152229 222187240 233209245 241227247"
        mycolors(12, 3, 10) = "047022045 065039078 092055111 123074148 158093191 178124205 197157216 216188229 230218238 239228244"
        colorname(13) = "Blue" : colorabbr(13) = "B" '                #240
        mycolors(13, 1, 10) = "000000119 000000183 002002255 065065255 102102255 133133255 163163255 194194255 217217255 231231255"
        mycolors(13, 2, 10) = "022022071 038038120 055055175 086086171 110110214 138138222 166166230 195195239 217217246 232232248"
        mycolors(13, 3, 10) = "026025052 045045091 064064128 085085178 112112191 139139205 167167216 195195229 215215246 231231245"
        colorname(14) = "Green-Blue" : colorabbr(14) = "GB" '         #191
        mycolors(14, 1, 10) = "000032039 000055067 000078095 000103125 000131159 000160194 000187227 042218255 135234255 185243255"
        mycolors(14, 2, 10) = "011031036 019054062 028078089 027103117 046129147 056157178 067186211 104216240 181227237 206238245"
        mycolors(14, 3, 10) = "016030033 029053059 042077085 056102112 069128140 085154169 100183200 132212229 171227238 208239245"
        colorname(15) = "Blue-Green" : colorabbr(15) = "BG" '         #180
        mycolors(15, 1, 10) = "000032032 000056056 000079079 000106106 000133133 000162162 000192192 000221221 000245245 107255255"
        mycolors(15, 2, 10) = "009031031 017054054 025078078 033104104 041130130 051160160 061190190 069219219 080250250 159248248"
        mycolors(15, 3, 10) = "014030030 026053053 038078078 050102102 065130130 079157157 093186186 109217217 118236236 187244244"
        colorname(16) = "Green" : colorabbr(16) = "G" '               #120
        mycolors(16, 1, 10) = "000034000 000058000 000084000 000109000 000138000 000168000 000198000 000229000 000254000 152255152"
        mycolors(16, 2, 10) = "010033010 018057018 026081026 034107034 043136043 052164052 062195062 071225071 079249079 189247189"
        mycolors(16, 3, 10) = "015031015 027054027 040080040 053106053 066133066 080161080 096191096 110220110 123245123 196245196"
        colorname(17) = "Yellow-Green" : colorabbr(17) = "YG" '       #74
        mycolors(17, 1, 10) = "020030000 036053000 052077000 071104000 089130000 109160000 128188000 148216000 163239000 174255000"
        mycolors(17, 2, 10) = "023030009 040052016 059076024 079101032 099127040 122155050 144183058 167213067 183233074 196250079"
        mycolors(17, 3, 10) = "025030014 043052025 061073036 083099049 105125062 128152074 152180090 176209105 194230115 207246122"
        colorname(18) = "Green-Yellow" : colorabbr(18) = "GY" '       #70
        mycolors(18, 1, 10) = "025030000 042051000 063076000 085102000 107128000 129155000 153183000 175210000 195234000 206247000"
        mycolors(18, 2, 10) = "025029009 046052016 065074023 087098031 111125039 134151048 160180057 185208066 203228073 217244078"
        mycolors(18, 3, 10) = "026029014 046051025 067073036 089097048 114124062 138150075 163178089 188215103 208227113 222242121"

        Dim i, j, k As Integer
        For i = 0 To 18
            For j = 1 To 3
                For k = 0 To 9
                    mycolors(i, j, k) = Mid(mycolors(i, j, 10), k * 10 + 1, 9)
                Next
            Next
        Next
        flcolor(1) = "255000000" 'red
        flcolor(2) = "255000255" 'hot pink
        flcolor(3) = "290000255" 'purple
        flcolor(4) = "255213000" 'dark yellow
        flcolor(5) = "255255000" 'yellow
        flcolor(6) = "226225000" 'cool yel

    End Sub

    Function getcolor(ByVal i As Integer, ByVal j As Integer, ByVal k As Integer) As System.Drawing.Color

        Dim red As Integer = 0
        Dim green As Integer = 0
        Dim blue As Integer = 0

        If mycolors(i, j, k) = "" Then
            initialize_colors()
        End If

        red = CInt(Mid(mycolors(i, j, k), 1, 3))
        green = CInt(Mid(mycolors(i, j, k), 4, 3))
        blue = CInt(Mid(mycolors(i, j, k), 7, 3))
        getcolor = System.Drawing.Color.FromArgb(red, green, blue)

    End Function
    Function flowercolor(ByVal n As Integer)

        Dim red As Integer = 0
        Dim green As Integer = 0
        Dim blue As Integer = 0

        red = CInt(Mid(flcolor(n), 1, 3))
        green = CInt(Mid(flcolor(n), 4, 3))
        blue = CInt(Mid(flcolor(n), 7, 3))
        flowercolor = System.Drawing.Color.FromArgb(red, green, blue)


    End Function


End Module